Scalar const c0 = a*d[3];
Scalar const c1 = 2.0*d[2];
Scalar const c2 = pow(a, 2);
Scalar const c3 = pow(b, 2);
Scalar const c4 = c2 + c3;
Scalar const c5 = pow(c4, 2);
Scalar const c6 = pow(c4, 3);
Scalar const c7 = c4*d[5] + c5*d[6] + c6*d[7] + 1.0;
Scalar const c8 = pow(c7, 2);
Scalar const c9 = 2*c4;
Scalar const c10 = 3*c5;
Scalar const c11 = c4*d[0];
Scalar const c12 = c5*d[1];
Scalar const c13 = c6*d[4];
Scalar const c14 = 2.0*(c10*d[7] + c9*d[6] + d[5])*(c11 + c12 + c13 + 1.0);
Scalar const c15 = 2.0*c10*d[4] + 2.0*c9*d[1] + 2.0*d[0];
Scalar const c16 = 1.0*c11 + 1.0*c12 + 1.0*c13 + 1.0;
Scalar const c17 = 1.0/c8;
Scalar const c18 = c17*f[0];
Scalar const c19 = b*d[3];
Scalar const c20 = a*b;
Scalar const c21 = -c14*c20 + c15*c20*c7;
Scalar const c22 = c17*f[1];
result[0] = c18*(-c14*c2 + c7*(c15*c2 + c16) + c8*(b*c1 + 6.0*c0));
result[1] = c18*(c21 + c8*(a*c1 + 2*c19));
result[2] = c22*(c21 + c8*(2*a*d[2] + 2.0*c19));
result[3] = c22*(-c14*c3 + c7*(c15*c3 + c16) + c8*(6.0*b*d[2] + 2.0*c0));
